<template>
    <div class="item">
        <div class="icon" @click="onRputeTo(field)" :style="{backgroundColor: bgColor}">
            <span class="['iconfont', {icon}]"></span>
        </div>
        <p class="icon-text">{{iconText}}</p>
    </div>
</template>

<script>
import { mapMutations } from 'vuex';
export default {
    name: 'CategoryIconsSub',
    props: {
        bgColor: String,
        icon: String,
        field: String,
        iconText: {
            type: String,
            default () {
                return '分类'
            }
        }
    },
    methods: {
        ...mapMutations([''])
        onRouteTo (field) {}
    }
}
</script>

<style lang="scss" scoped>

</style>